package cn.melon.view.control;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import cn.melon.view.JImgChangeButton;

/**
 * @ClassName: ChangeButtonBacImg
 * @author Hzy
 * 监听器，在鼠标移到JImgChangeButton上时改变背景
 */
public class ChangeButtonBacImg implements MouseListener{

    
    public ChangeButtonBacImg (){
    }
    @Override
    public void mouseEntered(MouseEvent e){
//      鼠标进入按钮时重绘
        JImgChangeButton b = (JImgChangeButton) e.getComponent();
        b.repaintComponent(true);
        
    }
    @Override
    public void mouseExited(MouseEvent e){
//      鼠标离开时重绘
        JImgChangeButton b = (JImgChangeButton) e.getComponent();
        b.repaintComponent(false);
    }
    @Override
    public void mouseClicked(MouseEvent e){
//      Do nothing;
    }
    @Override
    public void mouseReleased(MouseEvent e){
//      Do nothing
    }
    @Override
    public void mousePressed(MouseEvent e){
//      Do nothing
    }
}
